home *** CD-ROM | disk | FTP | other *** search
- unit MultipleSTAClientForm;
-
- interface
-
- uses
- MultipleSTAServer_TLB,
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
-
- type
- TForm2 = class(TForm)
- CheckBox1: TCheckBox;
- CheckBox2: TCheckBox;
- CheckBox3: TCheckBox;
- CheckBox4: TCheckBox;
- CheckBox5: TCheckBox;
- CheckBox6: TCheckBox;
- CheckBox7: TCheckBox;
- procedure CheckBoxClick(Sender: TObject);
- end;
-
- var
- Form2: TForm2;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm2.CheckBoxClick(Sender: TObject);
- var
- Chk: TCheckBox;
- Server: ISTAObject;
- begin
- Chk := Sender as TCheckBox;
- if Assigned(Chk) then
- begin
- if Chk.Checked then
- begin
- Server := CoSTAObject.Create;
- Server._AddRef;
- Chk.Tag := Longint(Server)
- end
- else
- begin
- Server := ISTAObject(Chk.Tag);
- Server._Release;
- Chk.Tag := 0
- end;
- end
- end;
-
- end.
-